<?php

require_once dirname(__FILE__) . '/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{

  public function setup ()
  {
    $this->enablePlugins('sfDoctrinePlugin');
    $this->enablePlugins('sfDoctrineGuardPlugin');
    $this->enablePlugins('sfPHPUnit2Plugin');
    
    if ($this->getEnvironment() == 'prod')
    {
      $this->setWebDir($this->getRootDir() . '');
    }
  }

  public function getEnvironment ()
  {
    if (! isset($_SERVER['HTTP_HOST']) or $_SERVER['HTTP_HOST'] == 'localhost')
    {
      return 'dev';
    }
    else
    {
      return 'prod';
    }
  }
}
